<template>
	<view>
		<view class="footer-fixed flex">
			<view class="l-view flex">
				<view class="label p-r-10">
					共
				</view>
				<view class="dl-view">
					<view class="dt">
						<text class="green p-r-10">{{footData.piecesCount || 0}}匹</text>
						<!-- <text class="blue">0</text> -->
					</view>
					<view class="dd">
						<text class="red">{{footData.totalPrice || 0}}元</text>
					</view>
				</view>
			</view>
			<view class="flex r-view">
				<view class="check-prod blue" @click="onCheckProd">
					选产品
				</view>
				<u-button :text="source=='khdd' ? '结单':'审核'" shape="circle" color="linear-gradient(to right, rgb(252, 241, 1), rgb(238, 212, 28), rgb(239, 205, 27), rgb(238 179 85))"  @click="onSave"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
import { object } from '@dcloudio/vue-cli-plugin-uni/packages/postcss/tags';

	export default {
		name: '',
		props: {
			// 页面来源
			source: {
				type: String,
				default: ''
			},
			// 页面类型
			type: {
				type: String,
				default: ''
			},
			// 数据
			footData:{
				type: Object,
				default: ''
			}

		},
		data() {
			return {
				
			}
		},
		methods: {
			// 选产品
			onCheckProd() {
				// if(this.source == 'xsd'){
				// 	this.$ls.get('xsdInformation')
				// }else if(this.source == 'cgd'){
				// 	console.log( this.$ls.get('cgdInformation'));
				// }
				uni.navigateTo({
					url: `/pages/application/pages/cloth/customer-product/index?type=${this.type}&source=${this.source}`
				})
			},
			// 保存
			onSave() {
				this.$emit('save')
			}
		},
		mounted() {
			
		}
	}
</script>

<style lang="scss" scoped>
	.footer-fixed {
		position: fixed;
		height: 120rpx;
		background: #fff;
		width: 100%;
		box-sizing: border-box;
		padding: 0 20rpx;
		bottom: 0;
		left: 0;
		z-index: 1;
		justify-content: space-between;
		align-items: center;
		.l-view {
			flex: 1;
		}
		.r-view {
			flex: 1;
			align-items: center;
			.check-prod {
				width: 140rpx;
				margin-right: 20rpx;
			}
		}
	}
</style>